<?php
namespace app\controller;
use app\BaseController;
class Test extends BaseController{
    public function index(){
        //返回当前方法名
        // return  'index, 方法名：'.$this->request->action();

        //返回实际路径
        return  'index, 实际路径：'.$this->app->getBasePath();
    } 
    public function hello($name = 'ThinkPHP6')
    {
        return 'hello,' . $name;
    }
    public function arrayOutput()
    {
        $data=['a'=>1, 'b'=>2, 'c'=>3];
        halt('中断输出');
        return json($data);
    }
}
?>